package com.boge.auth.model.dao.mappers;


import com.boge.auth.model.entity.SysDept;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysDeptMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(SysDept record);

    int insertSelective(SysDept record);

    SysDept selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(SysDept record);

    int updateByPrimaryKey(SysDept record);

    List<SysDept> getAllDepts();

    List<SysDept> getChildDeptListByLevel(String level);

    //TODO:如果不定义param
    //TODO:parameterType
    void batchUpdateLevel(@Param("sysDepts") List<SysDept> sysDepts);

    int countByNameAndParentId(@Param("parentId")int parentId, @Param("name")String name, @Param("id")Integer id);
}